package com.coffee.order.service.sku.dao;

import com.coffee.order.api.sku.query.OrderRelationQuery;
import com.coffee.order.service.sku.bean.OrderRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderRelationDao {
	public OrderRelation findById(Integer id);
	
	public OrderRelation findByIdForUpdate(Integer id);
	
	public List<OrderRelation> findByIds(@Param("idList")List<Integer> idList);
	
	public Integer count(@Param("param")OrderRelationQuery param);
	
	public List<OrderRelation> page(@Param("param")OrderRelationQuery param,@Param("offset")Integer offset,@Param("rows")Integer rows);

	public List<OrderRelation> list(@Param("param")OrderRelationQuery param);

	public OrderRelation findFirst(@Param("param")OrderRelationQuery param);
	
	public Integer insert(OrderRelation param);
	
	Integer insertBatch(List<OrderRelation> list);
	
	public void updateById(@Param("param")OrderRelation param);
	
	public Integer deleteById(Integer id);

	public Integer deleteByPayOrderId(Integer payOrderId);

	public Integer deleteByIds(List<Integer> idList);
	
}